package com.lzy.system.organization.dto;

/**
 * description: 公司信息 <br>
 * date: 2023/11/12 下午9:46 <br>
 * author: lcc <br>
 * version: 1.0 <br>
 */

import com.lzy.utils.validator.group.ServiceInsert;
import com.lzy.utils.validator.group.ServiceUpdate;
import com.lzy.validator.StringMinMaxConstraint;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

@Data
@ApiModel(value = "公司信息", description = "")
public class SysCompanyDTO {

    //添加
    @Null(groups = {ServiceInsert.class}, message = "{public.null.id}")
    //修改
    @NotNull(groups = {ServiceUpdate.class}, message = "{public.notNull.id}")
    private Integer id;

    @StringMinMaxConstraint(groups = {ServiceInsert.class,ServiceUpdate.class},min = 1,max = 50,message = "{sysCompanyDTO.companyName}")
    @ApiModelProperty("公司名称")
    private String company_name;

    @StringMinMaxConstraint(groups = {ServiceInsert.class,ServiceUpdate.class},min = 1,max = 50,message = "{sysCompanyDTO.companyNo}")
    @ApiModelProperty("公司编号")
    private String company_no;
}
